package gao.xiaolei.dao;

import gao.xiaolei.entity.TestProcess;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;

@Repository("TestProcessDao")
public interface TestProcessDao extends JpaRepository<TestProcess,String> {
    public void deleteAllByToProject(String toProject);

    public TestProcess findByToProject(String project);

    @Query("select totalEndTime from TestProcess where toProject=:projectId")
    public LocalDateTime getEndTime(@Param("projectId") String projectId);
}
